<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<IEnumerable<NETMovie.UI.WebMVC.Models.MovieModel>>" %>

 
   <body onload="init()">     
    <table>
        <tr>
            <th class="th_color">List of Movie</th>
        </tr>
        <tr>
           <th class="th_color"></th>
                <th class="th_color">Title</th>
        <th class="th_color">Description</th>
        <th class="th_color">Summary</th>
          <th class="th_color">Available Date</th>
            <th class="th_color">Premium</th>
        </tr>
    <%
        
        int i = 0;
        foreach (var item in Model)
        {
            i++; %>
        
        <tr>
         
            <td>
       
           <%:Html.ActionLink("Details", "ViewMovieDetails", new { id = item.MovieId })%>
            </td>
            <td>
           <%: Html.Encode(item.Title) %>
            </td>
         
            <td>
                
                <%: Html.Encode(item.Description)%>
            </td>
            <td>
            <%:Html.Encode(item.Summary)%>
            </td>
            <td><%:Html.Encode(item.AvailableDate)%></td>
            <td><% if(item.isPremium) { %>Yes <% } else { %> No <% } %></td>
        </tr>
    
    <% } %>

    </table>

    </body>